<script setup>
import HomeGrid from '@/components/HomeGrid.vue';
import HomeNew from '@/components/HomeNew.vue';
import HomeProduct from '@/components/HomeProduct.vue';
import HomeSwiper from '@/components/HomeSwiper.vue';
import HomeTop from '@/components/HomeTop.vue';
import {showToast} from 'vant';
import { ref }from "vue";
import HomeBook from '@/components/HomeBook.vue';

const search = ref('')
const onSearch = function(){
  showToast(search.value);
}
const onCanncel = function(){
  showToast('取消');
}
</script>

<template>

  <van-search
    v-model="search"
    show-action
    placeholder="请输入搜索关键词"
    @search="onSearch"
    @cancel="onCancel"
  />

<!-- <div>搜索栏里的内容: {{ search }}</div> -->
<HomeSwiper />
<HomeGrid />
<VanToast />
<HomeBook />
<HomeProduct />
<HomeNew />
<HomeTop />
</template>


<style lang="scss" scoped>

</style>